﻿using System;
using System.Web;

namespace CIK.News.Web.Infrastructure.Security
{
    public abstract class HttpModuleBase : IHttpModule
    {
        #region IHttpModule Members

        public void Init(HttpApplication context)
        {
            context.AuthenticateRequest += ContextAuthenticateRequest;
        }

        public void Dispose()
        {
        }

        #endregion


        void ContextAuthenticateRequest(object sender, EventArgs e)
        {
            var appliction = (HttpApplication)sender;
            AuthenticateRequest(appliction.Context);
        }

        public virtual void AuthenticateRequest(HttpContext httpContext)
        {

        }
    }
}